﻿using System;
using System.Collections.Generic;
using System.Text;

public class UIManage
{
    private static UIManage self;

    public UIManage()
    {
    }

    public static UIManage getInstance()
    {
        if (self == null)
        {
            self = new UIManage();
        }
        return self;
    }

    #region 界面物体对象的初始化
    /// <summary>
    /// 界面的物体对象
    /// </summary>
    //public static GameObject MenuChooseUI;
    /// <summary>
    /// 初始化选择对象
    /// </summary>
    //public static void ShowMenuChooseUI()
    //{
    //    if (MenuChooseUI == null)
    //    {
    //        MenuChooseUI = InitToParent(GameObject.Find("Anchor"), ResPath.UIPath + "MenuChooseUI");
    //        //MenuChooseUI.AddComponent("MenuChooseLogic");//通过手动绑定（需要继承MonoBehaviour）
    //    }
    //}

//     public static void HideMenuChooseUI()
//     {
//         if (MenuChooseUI != null)
//         {
//              Destroy(MenuChooseUI);
//         }
//     }

    #endregion

    /// <summary>
    /// 初始化加载界面到其父容器
    /// </summary>
    /// <param name="parent">父容器</param>
    /// <param name="_path">界面路径</param>
//     private static GameObject InitToParent(GameObject parent, string _path)
//     {
//         GameObject ui = (GameObject)Instantiate(Resources.Load(_path));
//         if (parent != null)
//         {
//             ui.transform.parent = parent.transform;
//             ui.transform.localScale = new Vector3(1, 1, 1);
//             ui.transform.localPosition = new Vector3(0, 0, 0);
//         }
//         return ui;
//     }



}
